:bug: Params for file upload parse error

huangqimin001 5 月之前
父節點
當前提交
7ecd5dbbe4
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      kodo/oauth_settings.py

+ 3 - 3
kodo/oauth_settings.py

@@ -250,9 +250,9 @@ def DJANGO_FILE_UPLOAD_CALLBACK_FUNC(request, file_path=None, file_url=None):
250 250
     from logs.models import MchLogInfo
251 251
     from utils.redis.rimage import set_image_data
252 252
     file_type = request.POST.get('file_type', '')
253
-    upload_qiniu = request.POST.get('upload_qiniu', '')
254
-    compress = bool(request.POST.get('compress', 1))
255
-    thumbnail = bool(request.POST.get('thumbnail', 1))
253
+    upload_qiniu = bool(int(request.POST.get('upload_qiniu', 0)))
254
+    compress = bool(int(request.POST.get('compress', 1)))
255
+    thumbnail = bool(int(request.POST.get('thumbnail', 1)))
256 256
     thumbnailw = int(request.POST.get('thumbnailw') or request.POST.get('w') or 1080)
257 257
     thumbnailh = int(request.POST.get('thumbnailh') or request.POST.get('h') or 720)
258 258